package cn.four.hqServer.modules.deposit.controller;

import cn.four.hqServer.common.result.Result;
import cn.four.hqServer.modules.deposit.dto.DeposDto;
import cn.four.hqServer.modules.deposit.service.CxmUserDepositService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author cccxm
 * @version 1.0
 */
@Api(tags = "柜台存款")
@Slf4j
@RestController
@RequestMapping("/userDeposit")
public class CxmUserDepositController {

    @Resource
    private CxmUserDepositService userDepositService;

    @PostMapping("/saveMoney")
    public Result saveMoney(@RequestBody @Validated DeposDto deposDto) throws InterruptedException {
        return userDepositService.saveMoney(deposDto);
    }
}
